/**
 * Weekly
 */
XF.WEEK = new function(){
	
	this.init = function(){
		var areas = $("map[name=planetmap] area");
		$(areas).hover(function(){
			var coords = $(this).attr("coords").split(",");
			var left = coords[0];
			var top = coords[1];
			var width = parseInt(coords[2])-parseInt(coords[0]);
			var height = parseInt(coords[3])-parseInt(coords[1]);
			var url = $(this).attr("href");
			$("#weekly_cover").css({
				"width":width+"px",
				"height":height+"px",
				"top":top+"px",
				"left":left+"px",
				"display":"block"
			});
			$("#weekly_cover").bind("click",function(){
				window.location.href = url;
			});
			$("#weekly_cover").bind("mouseleave",function(){
				$("#weekly_cover").css({
					"width":"100px",
					"height":"100px",
					"top":"0",
					"left":"0",
					"display":"none"
				});
			});
		},function(){
			
		});
		
		/*areas.bind("mouseenter",function(){
			$("#weekly_cover").css({
				"width":"100px",
				"height":"100px",
				"background":"#ccc",
				"top":"0",
				"left":"0",
				"opacity":"0.4",
				"border":"1px solid #b20001",
				"position":"absolute",
				"z-index":"100",
				"display:":"block"
			});
		});*/
		
		/*areas.bind("mouseenter",function(){
		$("#weekly_cover").css({
			"width":"100px",
			"height":"100px",
			
			"top":"0",
			"left":"0",
		
			"display":"block"
			});
		});
		areas.bind("mouseleave",function(){
			$("#weekly_cover").css({
				"width":"100px",
				"height":"100px",
				
				"top":"0",
				"left":"0",
			
				"display":"none"
				});
			});*/
			
		
		/*areas.bind("mouseleave",function(){
			//areas.unbind("mouseenter");
			$("#weekly_cover").css({
				"width":"0",
				"height":"0px",
				"background":"transparent",
				"top":"0",
				"left":"0",
				"display:":"none"
			});
		});*/
		
		/*areas.hover(function(){
			$("#weekly_cover").css({
				"width":"200px",
				"height":"100px",
				"background":"#ccc",
				"top":"0",
				"left":"0",
				"opacity":"0.4",
				"border":"1px solid #b20001"
			});
		},function(){
			$("#weekly_cover").css({
				"width":"0",
				"height":"0px",
				"background":"transparent",
				"top":"0",
				"left":"0",
			});
		});*/
		
	};

}();
